Fix endianness and alignment sins.
authorrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 3 Aug 2005 05:57:18 +0000 (05:57 +0000)
committerrobertl <robertl@f51c46e8-681c-474f-0cfe-069cfd0219fb>
Wed, 3 Aug 2005 05:57:18 +0000 (05:57 +0000)
gpsbabel/coto.c

index b5eecae861e3f5619ad3703c9ede94025086f810..07c835e31a3e88a19d40f7db12ec7607f421e244 100644 (file)
@@ -66,7 +66,8 @@ struct record_track {
 
 #define MAX_MARKER_NAME_LENGTH 20
 struct record_wpt {
-     double lon, lat;
+     char lon[8];
+     char lat[8];
      char name[MAX_MARKER_NAME_LENGTH];
 };
 
@@ -295,8 +296,7 @@ coto_prepare_wpt_write(struct pdb *opdb)
        opdb->appinfo = calloc(APPINFO_PACKED_SIZE,1);
        
        ai = (struct appinfo *) opdb->appinfo;
-       
-       ai->renamedCategories = 31; // Don't ask me why...
+       be_write16(&ai->renamedCategories, 31); // Don't ask me why...
        if (zerocat)
                strncpy(ai->categories[0], zerocat, 16);
        else